home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2854 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news.mcs.net!mdp
  2. From: mdp@mika-sys.com (Michael D. Perry)
  3. Newsgroups: comp.lang.c
  4. Subject: Printing to LPT1 Printer from within program
  5. Date: Wed, 24 Jan 96 14:07:05 GMT
  6. Organization: MIKA Systems
  7. Message-ID: <4e5ee9$m28_001@pr.mcs.net>
  8. NNTP-Posting-Host: mdp.pr.mcs.net
  9. X-Newsreader: News Xpress Version 1.0 Beta #4
  10.  
  11. I have just started taking a C programming class and am using Borland 
  12. C++ v4.0 at home.  Both my teacher and I are stumped as to how to 
  13. print to a LPT (Line Printer) device from within the program.
  14.  
  15. I have read the FAQ and there are some references to this but not 
  16. enough that I can quite figure it out.  As near as I can figure you 
  17. can use iostreams or fprintf() with the later appearing to be the 
  18. simpler of the two.  With that, from what I have seen, one uses a 
  19. filename of stdprn but I get an error message when compiling.  My 
  20. guess is that there is a header file or a definition/declaration 
  21. statement that needs to be referenced.
  22.  
  23. In Pascal the Function LPrint() does this job quite nicely but I can 
  24. find no suitable similar function in my reference manuals.  Can anyone 
  25. help with the appropriate function(s) and perhaps some examples of 
  26. them in source code?
  27.  
  28. I have looked at lots of materials on the Internet, quite a few books, 
  29. and hours in the on-line help and manuals for Borland C++ without 
  30. finding anything much about this.  So either I am incredibly stupid 
  31. because the answer is so obvious that no one writes about it or it is 
  32. a little more obscure and someone maybe should write it into an FAQ?
  33.  
  34. Thanks in advance;
  35.  
  36. Mike
  37.  
  38. -------------------------------------------------------------------
  39. Michael D. Perry      |   FIRST RULE OF INTELLIGENT TINKERING:
  40. MIKA Systems          |       Save all the parts.
  41. Glen Ellyn, Illinois    |   SATTINGER'S LAW:
  42. mdp@mika-sys.com |       It works better if you plug it in.
  43. -------------------------------------------------------------------
  44.